package com.zb.jnlxc.model;

import java.util.Date;

import javax.persistence.*;

import com.ZLHW.base.HTable.HIntTable;
import com.ZLHW.base.table.TableDeclare;

/**
 * Created by zhengbo.zb on 2014/8/25.
 */
@Entity
@Table(name = "JNLXC_ProductProcess")
@TableDeclare(comment = "生产工序记录", tableName = "ProductProcess")
public class ProductProcess extends HIntTable {
    @ManyToOne
    private ProductDetail productDetail;            //挤压记录

    private Integer       lastProcessId;            //上一道工序编号

    /** @link ProcessConstants.class */
    private String        processName;              //时效，打包，过磅，喷涂，氧化，入库

    private Integer       defectiveQuantity = 0;    //不合格数量

    private Integer       quantity          = 0;    //实测数量

    private Integer       uncompQuantity    = 0;    //未完成数量(下一道工序使用)

    private Integer       compQuantity      = 0;    //已完成数量(下一道工序使用)

    private Boolean       confirmed         = false;

    @ManyToOne
    private LiaoKuang     liaoKuang;                //料框

    private boolean       finished;                 //是否被下个工序处理完
    @ManyToOne
    private Admin         operator;                 //操作员

    private Integer       realWeight;               //实际重量

    /**---------------------------过磅-----------------------------------**/

    private Integer       theoryWeight;             //理论重量

    private Integer       gtQuantity;               //隔条数量

    private Integer       totalWeight;              //总重量

    /**-----------------------------氧化-----------------------------------**/

    private Integer       shangPaiDefectiveQuantity; //上排不合格数量（氧化）

    private Integer       xiaPaiDefectiveQuantity;  //下排不合格数量（氧化）

    private String        oxideFilm;                //实测厚度 （氧化）

    /**-----------------------------发货-----------------------------------**/

    private Long          delivePackCount;          //发货包数(打包)

    private Long          deliveWeight;             //发货重量(打包)

    @ManyToOne
    private Truck         truck;                    //货车

    /**-----------------------------打包-----------------------------------**/

    private Long          packTheoryWeight;         //理论重量(打包)

    private Long          quantityPerPackage;       //单包条数(打包)

    private Long          packageCount;             //总包数(打包)

    private Long          lastPackCount;            //最后一包数量(打包)

    /**-----------------------------时效-----------------------------------**/

    @Column(length = 100)
    private String        aginghardness;            //实测硬度

    @Temporal(TemporalType.TIMESTAMP)
    private Date          comeInTime;               //时效进炉时间

    @Temporal(TemporalType.TIMESTAMP)
    private Date          comeOutTime;              //时效出炉时间

    @Column(length = 100)
    private String        holdingTemperature;       //时效保温温度

    @Column(length = 100)
    private String        shixiaoluhao;             //时效炉号

    /**-----------------------------入库-----------------------------------**/

    @Column(length = 512)
    private String        storePlace;               //入库地址(入库)

    /**
     * Getter for property 'productDetail'.
     *
     * @return Value for property 'productDetail'.
     */
    public ProductDetail getProductDetail() {
        return productDetail;
    }

    /**
     * Setter for property 'productDetail'.
     *
     * @param productDetail Value to set for property 'productDetail'.
     */
    public void setProductDetail(ProductDetail productDetail) {
        this.productDetail = productDetail;
    }

    /**
     * Getter for property 'processName'.
     *
     * @return Value for property 'processName'.
     */
    public String getProcessName() {
        return processName;
    }

    /**
     * Setter for property 'processName'.
     *
     * @param processName Value to set for property 'processName'.
     */
    public void setProcessName(String processName) {
        this.processName = processName;
    }

    /**
     * Getter for property 'quantity'.
     *
     * @return Value for property 'quantity'.
     */
    public Integer getQuantity() {
        return quantity;
    }

    /**
     * Setter for property 'quantity'.
     *
     * @param quantity Value to set for property 'quantity'.
     */
    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    /**
     * Getter for property 'uncompQuantity'.
     *
     * @return Value for property 'uncompQuantity'.
     */
    public Integer getUncompQuantity() {
        return uncompQuantity;
    }

    /**
     * Setter for property 'uncompQuantity'.
     *
     * @param uncompQuantity Value to set for property 'uncompQuantity'.
     */
    public void setUncompQuantity(Integer uncompQuantity) {
        this.uncompQuantity = uncompQuantity;
    }

    /**
     * Getter for property 'compQuantity'.
     *
     * @return Value for property 'compQuantity'.
     */
    public Integer getCompQuantity() {
        return compQuantity;
    }

    /**
     * Setter for property 'compQuantity'.
     *
     * @param compQuantity Value to set for property 'compQuantity'.
     */
    public void setCompQuantity(Integer compQuantity) {
        this.compQuantity = compQuantity;
    }

    /**
     * Getter for property 'shangPaiDefectiveQuantity'.
     *
     * @return Value for property 'shangPaiDefectiveQuantity'.
     */
    public Integer getShangPaiDefectiveQuantity() {
        return shangPaiDefectiveQuantity;
    }

    /**
     * Setter for property 'shangPaiDefectiveQuantity'.
     *
     * @param shangPaiDefectiveQuantity Value to set for property 'shangPaiDefectiveQuantity'.
     */
    public void setShangPaiDefectiveQuantity(Integer shangPaiDefectiveQuantity) {
        this.shangPaiDefectiveQuantity = shangPaiDefectiveQuantity;
    }

    /**
     * Getter for property 'xiaPaiDefectiveQuantity'.
     *
     * @return Value for property 'xiaPaiDefectiveQuantity'.
     */
    public Integer getXiaPaiDefectiveQuantity() {
        return xiaPaiDefectiveQuantity;
    }

    /**
     * Setter for property 'xiaPaiDefectiveQuantity'.
     *
     * @param xiaPaiDefectiveQuantity Value to set for property 'xiaPaiDefectiveQuantity'.
     */
    public void setXiaPaiDefectiveQuantity(Integer xiaPaiDefectiveQuantity) {
        this.xiaPaiDefectiveQuantity = xiaPaiDefectiveQuantity;
    }

    /**
     * Getter for property 'oxideFilm'.
     *
     * @return Value for property 'oxideFilm'.
     */
    public String getOxideFilm() {
        return oxideFilm;
    }

    /**
     * Setter for property 'oxideFilm'.
     *
     * @param oxideFilm Value to set for property 'oxideFilm'.
     */
    public void setOxideFilm(String oxideFilm) {
        this.oxideFilm = oxideFilm;
    }

    /**
     * Getter for property 'liaoKuang'.
     *
     * @return Value for property 'liaoKuang'.
     */
    public LiaoKuang getLiaoKuang() {
        return liaoKuang;
    }

    /**
     * Setter for property 'liaoKuang'.
     *
     * @param liaoKuang Value to set for property 'liaoKuang'.
     */
    public void setLiaoKuang(LiaoKuang liaoKuang) {
        this.liaoKuang = liaoKuang;
    }

    /**
     * Getter for property 'finished'.
     *
     * @return Value for property 'finished'.
     */
    public boolean isFinished() {
        return finished;
    }

    /**
     * Setter for property 'finished'.
     *
     * @param finished Value to set for property 'finished'.
     */
    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    /**
     * Getter for property 'operator'.
     *
     * @return Value for property 'operator'.
     */
    public Admin getOperator() {
        return operator;
    }

    /**
     * Setter for property 'operator'.
     *
     * @param operator Value to set for property 'operator'.
     */
    public void setOperator(Admin operator) {
        this.operator = operator;
    }

    /**
     * Getter for property 'lastProcessId'.
     *
     * @return Value for property 'lastProcessId'.
     */
    public Integer getLastProcessId() {
        return lastProcessId;
    }

    /**
     * Setter for property 'lastProcessId'.
     *
     * @param lastProcessId Value to set for property 'lastProcessId'.
     */
    public void setLastProcessId(Integer lastProcessId) {
        this.lastProcessId = lastProcessId;
    }

    /**
     * Getter for property 'defectiveQuantity'.
     *
     * @return Value for property 'defectiveQuantity'.
     */
    public Integer getDefectiveQuantity() {
        return defectiveQuantity;
    }

    /**
     * Setter for property 'defectiveQuantity'.
     *
     * @param defectiveQuantity Value to set for property 'defectiveQuantity'.
     */
    public void setDefectiveQuantity(Integer defectiveQuantity) {
        this.defectiveQuantity = defectiveQuantity;
    }

    /**
     * Getter for property 'realWeight'.
     *
     * @return Value for property 'realWeight'.
     */
    public Integer getRealWeight() {
        return realWeight;
    }

    /**
     * Setter for property 'realWeight'.
     *
     * @param realWeight Value to set for property 'realWeight'.
     */
    public void setRealWeight(Integer realWeight) {
        this.realWeight = realWeight;
    }

    /**
     * Getter for property 'theoryWeight'.
     *
     * @return Value for property 'theoryWeight'.
     */
    public Integer getTheoryWeight() {
        return theoryWeight;
    }

    /**
     * Setter for property 'theoryWeight'.
     *
     * @param theoryWeight Value to set for property 'theoryWeight'.
     */
    public void setTheoryWeight(Integer theoryWeight) {
        this.theoryWeight = theoryWeight;
    }

    /**
     * Getter for property 'gtQuantity'.
     *
     * @return Value for property 'gtQuantity'.
     */
    public Integer getGtQuantity() {
        return gtQuantity;
    }

    /**
     * Setter for property 'gtQuantity'.
     *
     * @param gtQuantity Value to set for property 'gtQuantity'.
     */
    public void setGtQuantity(Integer gtQuantity) {
        this.gtQuantity = gtQuantity;
    }

    /**
     * Getter for property 'totalWeight'.
     *
     * @return Value for property 'totalWeight'.
     */
    public Integer getTotalWeight() {
        return totalWeight;
    }

    /**
     * Setter for property 'totalWeight'.
     *
     * @param totalWeight Value to set for property 'totalWeight'.
     */
    public void setTotalWeight(Integer totalWeight) {
        this.totalWeight = totalWeight;
    }

    /**
     * Getter for property 'packTheoryWeight'.
     *
     * @return Value for property 'packTheoryWeight'.
     */
    public Long getPackTheoryWeight() {
        return packTheoryWeight;
    }

    /**
     * Setter for property 'packTheoryWeight'.
     *
     * @param packTheoryWeight Value to set for property 'packTheoryWeight'.
     */
    public void setPackTheoryWeight(Long packTheoryWeight) {
        this.packTheoryWeight = packTheoryWeight;
    }

    /**
     * Getter for property 'storePlace'.
     *
     * @return Value for property 'storePlace'.
     */
    public String getStorePlace() {
        return storePlace;
    }

    /**
     * Setter for property 'storePlace'.
     *
     * @param storePlace Value to set for property 'storePlace'.
     */
    public void setStorePlace(String storePlace) {
        this.storePlace = storePlace;
    }

    /**
     * Getter for property 'aginghardness'.
     *
     * @return Value for property 'aginghardness'.
     */
    public String getAginghardness() {
        return aginghardness;
    }

    /**
     * Setter for property 'aginghardness'.
     *
     * @param aginghardness Value to set for property 'aginghardness'.
     */
    public void setAginghardness(String aginghardness) {
        this.aginghardness = aginghardness;
    }

    /**
     * Getter for property 'comeInTime'.
     *
     * @return Value for property 'comeInTime'.
     */
    public Date getComeInTime() {
        return comeInTime;
    }

    /**
     * Setter for property 'comeInTime'.
     *
     * @param comeInTime Value to set for property 'comeInTime'.
     */
    public void setComeInTime(Date comeInTime) {
        this.comeInTime = comeInTime;
    }

    /**
     * Getter for property 'comeOutTime'.
     *
     * @return Value for property 'comeOutTime'.
     */
    public Date getComeOutTime() {
        return comeOutTime;
    }

    /**
     * Setter for property 'comeOutTime'.
     *
     * @param comeOutTime Value to set for property 'comeOutTime'.
     */
    public void setComeOutTime(Date comeOutTime) {
        this.comeOutTime = comeOutTime;
    }

    /**
     * Getter for property 'holdingTemperature'.
     *
     * @return Value for property 'holdingTemperature'.
     */
    public String getHoldingTemperature() {
        return holdingTemperature;
    }

    /**
     * Setter for property 'holdingTemperature'.
     *
     * @param holdingTemperature Value to set for property 'holdingTemperature'.
     */
    public void setHoldingTemperature(String holdingTemperature) {
        this.holdingTemperature = holdingTemperature;
    }

    /**
     * Getter for property 'shixiaoluhao'.
     *
     * @return Value for property 'shixiaoluhao'.
     */
    public String getShixiaoluhao() {
        return shixiaoluhao;
    }

    /**
     * Setter for property 'shixiaoluhao'.
     *
     * @param shixiaoluhao Value to set for property 'shixiaoluhao'.
     */
    public void setShixiaoluhao(String shixiaoluhao) {
        this.shixiaoluhao = shixiaoluhao;
    }

    public Long getQuantityPerPackage() {
        return quantityPerPackage;
    }

    public void setQuantityPerPackage(Long quantityPerPackage) {
        this.quantityPerPackage = quantityPerPackage;
    }

    public Long getPackageCount() {
        return packageCount;
    }

    public void setPackageCount(Long packageCount) {
        this.packageCount = packageCount;
    }

    public Long getLastPackCount() {
        return lastPackCount;
    }

    public void setLastPackCount(Long lastPackCount) {
        this.lastPackCount = lastPackCount;
    }

    public Long getDelivePackCount() {
        return delivePackCount;
    }

    public void setDelivePackCount(Long delivePackCount) {
        this.delivePackCount = delivePackCount;
    }

    public Long getDeliveWeight() {
        return deliveWeight;
    }

    public void setDeliveWeight(Long deliveWeight) {
        this.deliveWeight = deliveWeight;
    }

    public Truck getTruck() {
        return truck;
    }

    public void setTruck(Truck truck) {
        this.truck = truck;
    }

    /**
     * Getter for property 'confirmed'.
     *
     * @return Value for property 'confirmed'.
     */
    public Boolean getConfirmed() {
        return confirmed;
    }

    /**
     * Setter for property 'confirmed'.
     *
     * @param confirmed Value to set for property 'confirmed'.
     */
    public void setConfirmed(Boolean confirmed) {
        this.confirmed = confirmed;
    }
}
